<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>选择器权重</title>
		<!-- 选择器权重越高，选中几率越大 -->
		<style>
			*{/*权值0 很容易被覆盖*/
				color: #fff000;
				background: #55ffff;
			}
			div{/*权值 1 */
				color: #000;
				background: #5f5;
			}
			.d1{/*权值 10 */
				color: #00f;
				background: #e4369c;
			}
			div.dl{/*选择器权值之和 权值1+10 11*/
				color: #000;
				background: #ff0000;
			}
			body div.dl{/*权值12*/
			font-size: 25px;
				color: #fff000;
				background: #00f;
			}
			#dl{/**/
			font-size:15px ;
			color: #e4369c;
			background: #00f;
			}
			div#dl:hover{/*权值111*/
			color: #e4369c;
				background: #fff000;
			}
		</style>
	</head>
	<body>
		<div class="dl" id="dl" style="color: red;">Lorem ipsum dolor sit amet consectetur adipisicing elit. Optio assumenda temporibus perspiciatis blanditiis laudantium ducimus non ipsum? Hic obcaecati in, id laboriosam doloremque dolor omnis, voluptatem vel pariatur, beatae quos?</div>
	</body>
</html>